2022 Team Names

team_names
Cleveland Cavaliers
Dallas Mavericks
Boston Celtics
Miami Heat
Golden State Warriors
Phoenix Suns
Philadelphia 76ers
Toronto Raptors
Los Angeles Clippers
New York Knicks
Utah Jazz
Denver Nuggets
New Orleans Pelicans
Memphis Grizzlies
Oklahoma City Thunder
Milwaukee Bucks
Washington Wizards
Chicago Bulls
Brooklyn Nets
Atlanta Hawks
Orlando Magic
Minnesota Timberwolves
Indiana Pacers
Detroit Pistons
Los Angeles Lakers
Portland Trail Blazers
San Antonio Spurs
Charlotte Hornets
Sacramento Kings
Houston Rockets

Off/Def Rebounds XY Plot

df %>%
  ggplot(aes(x = orb, y = drb)) +
  geom_point(size = 3) +
  geom_vline(aes(xintercept = mean(orb)),
             linetype = "dashed",
             size = 1.2) +
  geom_hline(aes(yintercept = mean(drb)),
             linetype = "dashed",
             size = 1.2) +
  ggrepel::geom_text_repel(aes(label = team))
Offensive and Defensive Rebounds for each Team

Offensive and Defensive Rebounds for each Team

Team 3-Point Scoring

three_pt <- df %>%
  mutate(
    three_z = z_score(x3p_percent),
    three_pt_pct = scales::percent(x3p_percent, accuracy = 0.1)
    ) %>%
  ggplot(
    aes(
      x = three_z,
      y = reorder(team, three_z),
      label = three_pt_pct
      )
    ) +
  geom_col(width = 0.2) +
  geom_point(
    aes(
      size = x3pa
      ),
    color = "green") +
  geom_vline(
    xintercept = 0,
    size = 1.2) +
  scale_x_continuous(
    breaks = seq(-3, 3, 1),
    labels = seq(20, 80, 10)
    ) +
  theme(
    legend.position = "none"
    ) +
  labs(
    x = "Three Point% t-score",
    y = NULL,
    title = "2021-2022 Three Point%",
    subtitle = "Dot Size = 3 Point Attempts"
    )

ggplotly(three_pt)